import React, { FC } from 'react';
import theme from '../../../theme';

interface CommunityIconProps {
  width?: string;
  color?: string;
}

const CommunityIcon: FC<CommunityIconProps> = ({ width, color }) => {
  const DEFAULT_WIDTH = '24';
  const DEFAULT_COLOR = theme.colors.general.textSecondary;

  return (
    <svg
      width={width || DEFAULT_WIDTH}
      fill={theme.colors.general[color] || DEFAULT_COLOR}
      xmlns="http://www.w3.org/2000/svg"
      viewBox="0 0 490.667 490.667"
    >
      <path d="M245.333 85.333c-41.173 0-74.667 33.493-74.667 74.667s33.493 74.667 74.667 74.667S320 201.173 320 160s-33.493-74.667-74.667-74.667zm0 128C215.936 213.333 192 189.397 192 160s23.936-53.333 53.333-53.333 53.333 23.936 53.333 53.333-23.935 53.333-53.333 53.333zM394.667 170.667c-29.397 0-53.333 23.936-53.333 53.333s23.936 53.333 53.333 53.333S448 253.397 448 224s-23.936-53.333-53.333-53.333zm0 85.333c-17.643 0-32-14.357-32-32s14.357-32 32-32 32 14.357 32 32-14.358 32-32 32zM97.515 170.667c-29.419 0-53.333 23.936-53.333 53.333s23.936 53.333 53.333 53.333 53.333-23.936 53.333-53.333-23.915-53.333-53.333-53.333zm0 85.333c-17.643 0-32-14.357-32-32s14.357-32 32-32 32 14.357 32 32-14.358 32-32 32zM245.333 256c-76.459 0-138.667 62.208-138.667 138.667 0 5.888 4.779 10.667 10.667 10.667S128 400.555 128 394.667c0-64.704 52.629-117.333 117.333-117.333s117.333 52.629 117.333 117.333c0 5.888 4.779 10.667 10.667 10.667S384 400.555 384 394.667C384 318.208 321.792 256 245.333 256z" />
      <path d="M394.667 298.667a96.006 96.006 0 00-49.728 13.867c-5.013 3.072-6.635 9.621-3.584 14.656 3.093 5.035 9.621 6.635 14.656 3.584C367.637 323.712 380.992 320 394.667 320c41.173 0 74.667 33.493 74.667 74.667 0 5.888 4.779 10.667 10.667 10.667s10.667-4.779 10.667-10.667c-.001-52.928-43.073-96-96.001-96zM145.707 312.512A96.06 96.06 0 0096 298.667c-52.928 0-96 43.072-96 96 0 5.888 4.779 10.667 10.667 10.667s10.667-4.779 10.667-10.667C21.333 353.493 54.827 320 96 320c13.675 0 27.029 3.712 38.635 10.752 5.013 3.051 11.584 1.451 14.656-3.584 3.072-5.035 1.45-11.584-3.584-14.656z" />
    </svg>
  );
};

export default CommunityIcon;
